<!doctype html>
<html>

<head>
</head>

<body><audio id="audio1" src="http://xmdx.sc.chinaz.com/Files/DownLoad/sound1/201501/5383.wav" style="display:none" controls="controls">
</audio>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
var FNScanner = null;
function openScan() {
    FNScanner.openView({
        autorotation: false,
        fixedOn : 'scanFrame'
    }, function(ret, err) {
        if (ret) {
            if (ret.eventType == "success") {
                api.execScript({
                    name: api.pageParam.winName,
                    frameName: api.pageParam.frameName,
                    script: 'scanResultTodo('+ret.content +')'
                });
                var myAudio = document.getElementById('audio1');
                myAudio.play();
                FNScanner.closeView();
                setTimeout("openScan()",500);
            }
        } else {
            alert(JSON.stringify(err));
        }
    });
}
    apiready = function() {
        FNScanner = api.require('FNScanner');
        openScan();
    };
    apiready();
</script>

</html>
